package cc.iotkit.system.controller;

import cc.iotkit.common.api.Request;
import cc.iotkit.manager.dto.bo.map.MapTrackBo;
import cc.iotkit.manager.service.IMapService;
import cc.iotkit.model.bas.BasAreaRecord;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@Validated
@RestController
@RequestMapping("/map")
@Api(tags = "地图")
public class MapController {
    @Autowired
    private IMapService service;

    @ApiOperation(value = "轨迹查询", notes = "轨迹查询")
    @PostMapping("/track")
    public Map<String,Object> track(@Validated @RequestBody Request<MapTrackBo> query) {
        return service.getTrack(query.getData());
    }
}
